/*!
 * @file PropertySensor.cpp
 * @author Rocco Martino
 */
/***************************************************************************
 *   Copyright (C) 2014 by Rocco Martino                                   *
 *   martinorocco@gmail.com                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License as        *
 *   published by the Free Software Foundation; either version 2.1 of the  *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Lesser General Public      *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

/* ======================================================================= */
/* ....................................................................... */
#include <ooGame/PropertySensor>

#include <osgODE/Notify>
#include <osgODE/ODEObject>
/* ....................................................................... */
/* ======================================================================= */




using namespace ooGame ;




/* ======================================================================= */
/* ....................................................................... */
PropertySensor::PropertySensor(EvaluationType evaluation_type):
    m_evaluation_type       ( evaluation_type )
{
}
/* ....................................................................... */
/* ======================================================================= */




/* ======================================================================= */
/* ....................................................................... */
PropertySensor::PropertySensor(const PropertySensor& other, const osg::CopyOp& copyop):
    Sensor                  ( other, copyop ),
    m_evaluation_type       ( other.m_evaluation_type ),
    m_property              ( other.m_property )
{
}
/* ....................................................................... */
/* ======================================================================= */




/* ======================================================================= */
/* ....................................................................... */
PropertySensor::~PropertySensor(void)
{
}
/* ....................................................................... */
/* ======================================================================= */




/* ======================================================================= */
/* ....................................................................... */
bool
PropertySensor::pulse( osgODE::ODEObject* object, Game* game )
{
    (void) game ;

    PS_ASSERT1( object != NULL ) ;

    return evaluate(object) ;
}
/* ....................................................................... */
/* ======================================================================= */




/* ======================================================================= */
/* ....................................................................... */
bool
PropertySensor::evaluate(osg::Object* object)
{
    PS_FATAL("ooGame::PropertySensor::evaluate(%p, object=%p): base class method invokation", this, object) ;

    (void) object ;

    return false ;
}
/* ....................................................................... */
/* ======================================================================= */
